A linear motor comprises a motor body in which a stator is disposed, a mover that faces the stator, and a slider in which the mover is disposed. The slider moves relative to the motor body along a predetermined moving path. One of the stator and the mover may be constituted by a plurality of permanent magnets and the other may be constituted by an electromagnet. Otherwise, both the stator and the mover may be constituted by an electromagnet. When permanent magnets are used, the respective permanent magnets are arranged along the moving path so that different magnetic polarities appear alternately. Moreover, the electromagnet comprises a plurality of cores arranged along the moving path. A coil is attached to each core. Moreover, the linear motor comprises a control device. The control device controls conduction of the coils and causes the slider to move along the moving path while generating attractive force between the stators.
In order to detect the position of the slider, a linear scale is provided in the linear motor. For example, in the device disclosed in Japanese Patent Laid-open Publication No. 2003-244929, a linear scale is attached to a slider. The device of Japanese Patent Laid-open Publication No. 2003-244929 further comprises a position detection sensor that detects the linear scale to output a wave signal, an origin sensor that outputs a signal for specifying an origin position of the wave signal, and a sensor substrate for attaching the origin sensor to a motor body. The position detection sensor and the origin sensor output signals according to a moving position of the slider, and the position of the slider is detected based on these signals.
However, the sensor substrate of Japanese Patent Laid-open Publication No. 2003-244929 is disposed in a central portion of the stator attached to the motor body in a direction along the moving path. Moreover, the sensors are also laid out in the central portion of the stator. For this reason, there is a problem in that it is not possible to detect the position until the linear scale of the slider reaches the origin sensor disposed in the central portion of the stator. Therefore, as disclosed in Japanese Patent Laid-open Publication No. 2011-101552, the present applicant proposes a linear motor in which an origin sensor is disposed at a position where the origin sensor meets an end of a stator in the direction along a moving path. The linear motor employs a stator unit that comprises a motor body and stators mounted on the motor body. One or more stator units are connected along the moving path to form a linear motor together with a slider that has a mover. The stator unit comprises a sensor head, as a sensor substrate, for each stator. In the sensor head, an origin sensor is disposed at a position where the origin sensor meets an end of the stator in the direction along the moving path.